//
//  AssetPickerController.h
//
//  自定义的图片选择器，继承UINavigationController
//
//  Created by Yangfan on 15/2/4.
//  Copyright (c) 2015年 4gread. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import "AllSelectPicFromLibrary.h"
#import "AppDelegate.h"
#import "AssetGroupViewController.h"

#define D_Main_Appdelegate (AppDelegate *)[UIApplication sharedApplication].delegate

@protocol AssetPickerControllerDelegate;

@interface AssetPickerController : UINavigationController

@property (nonatomic, weak) id <UINavigationControllerDelegate, AssetPickerControllerDelegate> delegate;
@property (nonatomic, strong) ALAssetsFilter *assetsFilter;
@property (nonatomic, copy) NSArray *indexPathsForSelectedItems;
@property (nonatomic, assign) NSInteger maximumNumberOfSelection;
@property (nonatomic, assign) NSInteger minimumNumberOfSelection;
@property (nonatomic, strong) NSPredicate *selectionFilter;
@property (nonatomic, assign) BOOL showCancelButton;
@property (nonatomic, assign) BOOL showEmptyGroups;
@property (nonatomic, assign) BOOL isFinishDismissViewController;
@property (nonatomic, strong) AllSelectPicFromLibrary    *showAllSelectedImageView;
@property (nonatomic, strong) UIViewController    *vc;
@end

@protocol AssetPickerControllerDelegate <NSObject>
-(void)assetPickerController:(AssetPickerController *)picker didFinishPickingAssets:(NSArray *)assets;
@optional
-(void)assetPickerControllerDidCancel:(AssetPickerController *)picker;
-(void)assetPickerController:(AssetPickerController *)picker didSelectAsset:(ALAsset*)asset;
-(void)assetPickerController:(AssetPickerController *)picker didDeselectAsset:(ALAsset*)asset;
-(void)assetPickerControllerDidMaximum:(AssetPickerController *)picker;
-(void)assetPickerControllerDidMinimum:(AssetPickerController *)picker;

@end